package com.hz.filesystem.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hz.common.utils.PageUtils;
import com.hz.filesystem.entity.HzFileEntity;
import com.hz.filesystem.web.FoundFileEntity;

import java.util.List;
import java.util.Map;

/**
 * 
 *
 * @author txw_cyl
 * @email sunlightcs@gmail.com
 * @date 2022-04-22 20:37:21
 */
public interface HzFileService extends IService<HzFileEntity> {

    PageUtils queryPage(Map<String, Object> params);

    boolean createdir(long upperFid, String fileName,long userId,int fileType);

    List<HzFileEntity> queryfilesbyfid(int curPage, int pageSize, long upperFid, long userId);

    boolean deletebyfid(long fid, long userId);

    boolean addfiledowncount(long fid);

    boolean createfile(String fileAddress, long upperFid, String fileName, long userId, int fileType, long fileSize);

    boolean deletefilesbyids(List<String> ids, long userId);

    List<FoundFileEntity> queryfilesbyname(String filename, long userId, int fileBelongto);

    JSONObject queryfilesbystate(int verifyState, long userId, int curPage, int pageSize);

    List<HzFileEntity> querypublicfilesbyfid(long upperFid, long userId);

    List<HzFileEntity> querypublicfilesbydowncount(int curPage,int pageSize);

    List<HzFileEntity> querypublicfilesbyfidpca(long upperFid, long userId, Integer pcatype, Long pcaid);

    boolean changefiletodir(long fid, long did, long userId);

    List<HzFileEntity> getalldirsbyfid(long upperFid, long userId);

    List<HzFileEntity> getalldirsbyfidtomove(long upperFid, long userId, long mfid);

    List<FoundFileEntity> queryfilesbynameandpca(String filename, long userId, int fileBelongto, int pcatype, Long pcaid);

    Integer querypublicfilesnum();

    Integer queryfilesnum(long upperFid);
}

